import request from "@/utils/request";

// 获取试卷管理列表
export function getList(data) {
  return request({
    url: "/api/exam/paper/getList",
    method: "post",
    data,
  });
}
export function addList(data) {
    return request({
      url: "/api/exam/paper",
      method: "post",
      data,
    });
  }
  export function deleteExam(id) {
    return request({
        url: `/api/exam/paper/${id}`,
        method: "DELETE",
      });
  }

  export function getDetail(id) {
    return request({
      url: `/api/exam/paper/${id}`,
      method: "get",
    });
  }
  // 修改试题管理
export function Update(data) {
    return request({
      url: `/api/exam/paper/${data.id}`,
      method: "PUT",
      data,
    });
  }

  // 获取考试列表
export function getExamList(data) {
  return request({
    url: "/api/exam/TemsExam/getList",
    method: "post",
    data,
  });
}

  // 获取考试列表
  export function addExam(data) {
    return request({
      url: "/api/exam/TemsExam",
      method: "post",
      data,
    });
  }

  export function getExamDetail(id) {
    return request({
      url: `/api/exam/TemsExam/${id}`,
      method: "get",
    });
  }
 
  export function UpdateExam(data) {
    return request({
      url: `/api/exam/TemsExam/${data.id}`,
      method: "PUT",
      data,
    });
  }

  export function deleteA(id) {
    return request({
        url: `/api/exam/TemsExam/${id}`,
        method: "DELETE",
      });
  }

  // 试卷管理 - 导出
  export function exportExecl(params, data) {
    return request({
      url: `/api/exam/paper/Actions/Export?`+params,
      method: 'get',
      data
    })
  }

 // 考试管理 - 导出
 export function exportExamExecl(params, data) {
  return request({
    url: `/api/exam/TemsExam/Actions/Export?`+params,
    method: 'get',
    data
  })
}

export function exportExam(data) {
  return request({
    url: '/api/exam/export',
    method: 'Get',
    data
  })
}